1
//------------------------------------------------------------------------------
3 // This code was generated by a tool.
4 // Runtime Version:4.0.30319.1
6 // Changes to this file may cause incorrect behavior and will be lost if
7 // the code is regenerated.
9 //------------------------------------------------------------------------------
12 // This source code was auto-generated by Microsoft.VSDesigner, Version 4.0.30319.1.
14 #pragma warning disable 1591
16 namespace NAVWebServicesSampleCode
.NAVCodeunitWS
{
18 using System
.Web
.Services
;
19 using System
.Diagnostics
;
20 using System
.Web
.Services
.Protocols
;
21 using System
.ComponentModel
;
22 using System
.Xml
.Serialization
;
26 // CODEGEN: No methods were found in the WSDL for this protocol.
27 [System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
28 [System
.Diagnostics
.DebuggerStepThroughAttribute()]
29 [System
.ComponentModel
.DesignerCategoryAttribute("code")]
30 [System
.Web
.Services
.WebServiceBindingAttribute(Name
="NAVCodeunit_Binding", Namespace
="urn:microsoft-dynamics-schemas/codeunit/NAVCodeunit")]
31 public partial class NAVCodeunit
: System
.Web
.Services
.Protocols
.SoapHttpClientProtocol
{
33 private bool useDefaultCredentialsSetExplicitly
;
36 public NAVCodeunit() {
37 this.Url
= global::NAVWebServicesSampleCode
.Properties
.Settings
.Default
.NAVWebServicesSampleCode_NAVCodeunitWS_NAVCodeunit
;
38 if ((this.IsLocalFileSystemWebService(this.Url
) == true)) {
39 this.UseDefaultCredentials
= true;
40 this.useDefaultCredentialsSetExplicitly
= false;
43 this.useDefaultCredentialsSetExplicitly
= true;
47 public new string Url
{
52 if ((((this.IsLocalFileSystemWebService(base.Url
) == true)
53 && (this.useDefaultCredentialsSetExplicitly
== false))
54 && (this.IsLocalFileSystemWebService(value) == false))) {
55 base.UseDefaultCredentials
= false;
61 public new bool UseDefaultCredentials
{
63 return base.UseDefaultCredentials
;
66 base.UseDefaultCredentials
= value;
67 this.useDefaultCredentialsSetExplicitly
= true;
71 private bool IsLocalFileSystemWebService(string url
) {
73 || (url
== string.Empty
))) {
76 System
.Uri wsUri
= new System
.Uri(url
);
77 if (((wsUri
.Port
>= 1024)
78 && (string.Compare(wsUri
.Host
, "localHost", System
.StringComparison
.OrdinalIgnoreCase
) == 0))) {
86 #pragma warning restore 1591